package com.cmas.manage.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cmas.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;
import java.util.Date;


/**
 * 学生信息视图对象 mall_package
 *
 * @author cmas
 * @date 2021-05-01
 */
@Data
@ApiModel("学生信息视图对象")
public class StudentInfoVo {
    private static final long serialVersionUID = 1L;

    /**
     * 学生信息ID
     */
    @ApiModelProperty("学生信息ID")
    private Long id;

    /**
     * (学生账号)user_id
     */
    @Excel(name = "(学生账号)user_id")
    @ApiModelProperty("(学生账号)user_id")
    private Long account;
    /**
     * 学号
     */
    @Excel(name = "学号")
    @ApiModelProperty("学号")
    private String stuNo;
    /**
     * 详细地址
     */
    @Excel(name = "详细地址")
    @ApiModelProperty("详细地址")
    private String location;
    /**
     * 籍贯
     */
    @Excel(name = "籍贯")
    @ApiModelProperty("籍贯")
    private String nativePlace;
    /**
     * 政治面貌
     */
    @Excel(name = "政治面貌")
    @ApiModelProperty("政治面貌")
    private String political;
    /**
     * 入学时间
     */
    @Excel(name = "入学时间", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("入学时间")
    private Date admissionTime;
    /**
     * 生日
     */
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("生日")
    private Date birthday;

    /**
     * 部门ID
     */
    @ApiModelProperty("部门")
    private Long deptId;

    /**
     * 姓名
     */
    @ApiModelProperty("姓名")
    private String stuName;

    /** 用户邮箱 */
    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    @Excel(name = "用户邮箱")
    private String email;

    /** 手机号码 */
    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
    @Excel(name = "手机号码")
    private String phonenumber;

    /** 用户性别 */
    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
    private String sex;

    /** 用户头像 */
    private String avatar;


    @TableField(exist = false)
    private String userName;
}
